//
//  KCAllFuncCell.swift
//  MyKC
//
//  Created by yy on 2017/3/7.
//  Copyright © 2017年 com.yasuo. All rights reserved.
//

import UIKit


@objc protocol KCAllFuncCellDelegate: NSObjectProtocol {
    @objc optional func btnClick(tag: NSInteger)
}

class KCAllFuncCell: UITableViewCell {
    
    weak var delegate: KCAllFuncCellDelegate?
    @IBOutlet weak var btn_mine: UIButton!
    @IBOutlet weak var btn_paiban: UIButton!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        guard let typeString = shareAppSetting.userType else { return  }
        let type = typeString as NSString
        if type.integerValue == 5000420 || type.integerValue == 5000430 {
            btn_mine.isHidden = true
            btn_paiban.setBackgroundImage(UIImage.init(named:"我的"), for: .normal)
        }
        else {
            btn_mine.isHidden = false
            btn_paiban.setBackgroundImage(UIImage.init(named:"排班"), for: .normal)
        }
    }

    
    @IBAction func btnCLick(_ sender: UIButton) {
        delegate?.btnClick?(tag: sender.tag)
    }
    
}
